package c.e.a.b.e.c;

import android.os.Bundle;
import android.os.IBinder;
import android.os.IInterface;
import android.os.Parcel;
import android.os.RemoteException;
import c.e.a.b.c.a.a;
import com.google.android.gms.dynamite.descriptors.com.google.android.gms.measurement.dynamite.ModuleDescriptor;
import com.google.android.gms.internal.measurement.zzae;
import com.huawei.hms.adapter.internal.AvailableCode;
import com.huawei.hms.api.ConnectionResult;

/* compiled from: com.google.android.gms:play-services-measurement-base@@18.0.0 */
public abstract class fc extends s0 implements gc {
    public fc() {
        super("com.google.android.gms.measurement.api.internal.IAppMeasurementDynamiteService");
    }

    public static gc asInterface(IBinder iBinder) {
        if (iBinder == null) {
            return null;
        }
        IInterface queryLocalInterface = iBinder.queryLocalInterface("com.google.android.gms.measurement.api.internal.IAppMeasurementDynamiteService");
        if (queryLocalInterface instanceof gc) {
            return (gc) queryLocalInterface;
        }
        return new ic(iBinder);
    }

    public final boolean y0(int i, Parcel parcel, Parcel parcel2, int i2) throws RemoteException {
        Parcel parcel3 = parcel;
        String str = "com.google.android.gms.measurement.api.internal.IEventHandlerProxy";
        boolean z = false;
        String str2 = "com.google.android.gms.measurement.api.internal.IBundleReceiver";
        hc hcVar = null;
        String readString;
        IInterface queryLocalInterface;
        IBinder readStrongBinder;
        IInterface queryLocalInterface2;
        ClassLoader classLoader;
        IInterface queryLocalInterface3;
        IBinder readStrongBinder2;
        c cVar;
        switch (i) {
            case 1:
                initialize(a.J0(parcel.readStrongBinder()), (zzae) v.a(parcel, zzae.CREATOR), parcel.readLong());
                break;
            case 2:
                logEvent(parcel.readString(), parcel.readString(), (Bundle) v.a(parcel, Bundle.CREATOR), parcel.readInt() != 0, parcel.readInt() != 0, parcel.readLong());
                break;
            case 3:
                str = parcel.readString();
                readString = parcel.readString();
                Bundle bundle = (Bundle) v.a(parcel, Bundle.CREATOR);
                IBinder readStrongBinder3 = parcel.readStrongBinder();
                if (readStrongBinder3 != null) {
                    jc jcVar;
                    queryLocalInterface = readStrongBinder3.queryLocalInterface(str2);
                    if (queryLocalInterface instanceof hc) {
                        jcVar = (hc) queryLocalInterface;
                    } else {
                        jcVar = new jc(readStrongBinder3);
                    }
                    hcVar = jcVar;
                }
                logEventAndBundle(str, readString, bundle, hcVar, parcel.readLong());
                break;
            case 4:
                str = parcel.readString();
                str2 = parcel.readString();
                c.e.a.b.c.a J0 = a.J0(parcel.readStrongBinder());
                ClassLoader classLoader2 = v.a;
                setUserProperty(str, str2, J0, parcel.readInt() != 0, parcel.readLong());
                break;
            case 5:
                str = parcel.readString();
                String readString2 = parcel.readString();
                ClassLoader classLoader3 = v.a;
                if (parcel.readInt() != 0) {
                    z = true;
                }
                readStrongBinder = parcel.readStrongBinder();
                if (readStrongBinder != null) {
                    queryLocalInterface = readStrongBinder.queryLocalInterface(str2);
                    if (queryLocalInterface instanceof hc) {
                        hcVar = (hc) queryLocalInterface;
                    } else {
                        hcVar = new jc(readStrongBinder);
                    }
                }
                getUserProperties(str, readString2, z, hcVar);
                break;
            case 6:
                str = parcel.readString();
                readStrongBinder = parcel.readStrongBinder();
                if (readStrongBinder != null) {
                    queryLocalInterface2 = readStrongBinder.queryLocalInterface(str2);
                    if (queryLocalInterface2 instanceof hc) {
                        hcVar = (hc) queryLocalInterface2;
                    } else {
                        hcVar = new jc(readStrongBinder);
                    }
                }
                getMaxUserProperties(str, hcVar);
                break;
            case 7:
                setUserId(parcel.readString(), parcel.readLong());
                break;
            case 8:
                setConditionalUserProperty((Bundle) v.a(parcel, Bundle.CREATOR), parcel.readLong());
                break;
            case 9:
                clearConditionalUserProperty(parcel.readString(), parcel.readString(), (Bundle) v.a(parcel, Bundle.CREATOR));
                break;
            case 10:
                str = parcel.readString();
                readString = parcel.readString();
                readStrongBinder = parcel.readStrongBinder();
                if (readStrongBinder != null) {
                    queryLocalInterface = readStrongBinder.queryLocalInterface(str2);
                    if (queryLocalInterface instanceof hc) {
                        hcVar = (hc) queryLocalInterface;
                    } else {
                        hcVar = new jc(readStrongBinder);
                    }
                }
                getConditionalUserProperties(str, readString, hcVar);
                break;
            case 11:
                classLoader = v.a;
                if (parcel.readInt() != 0) {
                    z = true;
                }
                setMeasurementEnabled(z, parcel.readLong());
                break;
            case 12:
                resetAnalyticsData(parcel.readLong());
                break;
            case 13:
                setMinimumSessionDuration(parcel.readLong());
                break;
            case 14:
                setSessionTimeoutDuration(parcel.readLong());
                break;
            case 15:
                setCurrentScreen(a.J0(parcel.readStrongBinder()), parcel.readString(), parcel.readString(), parcel.readLong());
                break;
            case 16:
                readStrongBinder = parcel.readStrongBinder();
                if (readStrongBinder != null) {
                    queryLocalInterface3 = readStrongBinder.queryLocalInterface(str2);
                    if (queryLocalInterface3 instanceof hc) {
                        hcVar = (hc) queryLocalInterface3;
                    } else {
                        hcVar = new jc(readStrongBinder);
                    }
                }
                getCurrentScreenName(hcVar);
                break;
            case 17:
                readStrongBinder = parcel.readStrongBinder();
                if (readStrongBinder != null) {
                    queryLocalInterface3 = readStrongBinder.queryLocalInterface(str2);
                    if (queryLocalInterface3 instanceof hc) {
                        hcVar = (hc) queryLocalInterface3;
                    } else {
                        hcVar = new jc(readStrongBinder);
                    }
                }
                getCurrentScreenClass(hcVar);
                break;
            case 18:
                d dVar;
                readStrongBinder = parcel.readStrongBinder();
                if (readStrongBinder != null) {
                    queryLocalInterface3 = readStrongBinder.queryLocalInterface("com.google.android.gms.measurement.api.internal.IStringProvider");
                    if (queryLocalInterface3 instanceof d) {
                        dVar = (d) queryLocalInterface3;
                    } else {
                        dVar = new f(readStrongBinder);
                    }
                }
                setInstanceIdProvider(dVar);
                break;
            case ConnectionResult.SERVICE_MISSING_PERMISSION /*19*/:
                readStrongBinder = parcel.readStrongBinder();
                if (readStrongBinder != null) {
                    queryLocalInterface3 = readStrongBinder.queryLocalInterface(str2);
                    if (queryLocalInterface3 instanceof hc) {
                        hcVar = (hc) queryLocalInterface3;
                    } else {
                        hcVar = new jc(readStrongBinder);
                    }
                }
                getCachedAppInstanceId(hcVar);
                break;
            case ModuleDescriptor.MODULE_VERSION /*20*/:
                readStrongBinder = parcel.readStrongBinder();
                if (readStrongBinder != null) {
                    queryLocalInterface3 = readStrongBinder.queryLocalInterface(str2);
                    if (queryLocalInterface3 instanceof hc) {
                        hcVar = (hc) queryLocalInterface3;
                    } else {
                        hcVar = new jc(readStrongBinder);
                    }
                }
                getAppInstanceId(hcVar);
                break;
            case 21:
                readStrongBinder = parcel.readStrongBinder();
                if (readStrongBinder != null) {
                    queryLocalInterface3 = readStrongBinder.queryLocalInterface(str2);
                    if (queryLocalInterface3 instanceof hc) {
                        hcVar = (hc) queryLocalInterface3;
                    } else {
                        hcVar = new jc(readStrongBinder);
                    }
                }
                getGmpAppId(hcVar);
                break;
            case 22:
                readStrongBinder = parcel.readStrongBinder();
                if (readStrongBinder != null) {
                    queryLocalInterface3 = readStrongBinder.queryLocalInterface(str2);
                    if (queryLocalInterface3 instanceof hc) {
                        hcVar = (hc) queryLocalInterface3;
                    } else {
                        hcVar = new jc(readStrongBinder);
                    }
                }
                generateEventId(hcVar);
                break;
            case 23:
                beginAdUnitExposure(parcel.readString(), parcel.readLong());
                break;
            case 24:
                endAdUnitExposure(parcel.readString(), parcel.readLong());
                break;
            case 25:
                onActivityStarted(a.J0(parcel.readStrongBinder()), parcel.readLong());
                break;
            case 26:
                onActivityStopped(a.J0(parcel.readStrongBinder()), parcel.readLong());
                break;
            case AvailableCode.USER_IGNORE_PREVIOUS_POPUP /*27*/:
                onActivityCreated(a.J0(parcel.readStrongBinder()), (Bundle) v.a(parcel, Bundle.CREATOR), parcel.readLong());
                break;
            case 28:
                onActivityDestroyed(a.J0(parcel.readStrongBinder()), parcel.readLong());
                break;
            case 29:
                onActivityPaused(a.J0(parcel.readStrongBinder()), parcel.readLong());
                break;
            case 30:
                onActivityResumed(a.J0(parcel.readStrongBinder()), parcel.readLong());
                break;
            case 31:
                c.e.a.b.c.a J02 = a.J0(parcel.readStrongBinder());
                readStrongBinder2 = parcel.readStrongBinder();
                if (readStrongBinder2 != null) {
                    queryLocalInterface = readStrongBinder2.queryLocalInterface(str2);
                    if (queryLocalInterface instanceof hc) {
                        hcVar = (hc) queryLocalInterface;
                    } else {
                        hcVar = new jc(readStrongBinder2);
                    }
                }
                onActivitySaveInstanceState(J02, hcVar, parcel.readLong());
                break;
            case 32:
                Bundle bundle2 = (Bundle) v.a(parcel, Bundle.CREATOR);
                readStrongBinder2 = parcel.readStrongBinder();
                if (readStrongBinder2 != null) {
                    queryLocalInterface = readStrongBinder2.queryLocalInterface(str2);
                    if (queryLocalInterface instanceof hc) {
                        hcVar = (hc) queryLocalInterface;
                    } else {
                        hcVar = new jc(readStrongBinder2);
                    }
                }
                performAction(bundle2, hcVar, parcel.readLong());
                break;
            case 33:
                logHealthData(parcel.readInt(), parcel.readString(), a.J0(parcel.readStrongBinder()), a.J0(parcel.readStrongBinder()), a.J0(parcel.readStrongBinder()));
                break;
            case 34:
                readStrongBinder = parcel.readStrongBinder();
                if (readStrongBinder != null) {
                    queryLocalInterface3 = readStrongBinder.queryLocalInterface(str);
                    if (queryLocalInterface3 instanceof c) {
                        cVar = (c) queryLocalInterface3;
                    } else {
                        cVar = new e(readStrongBinder);
                    }
                }
                setEventInterceptor(cVar);
                break;
            case 35:
                readStrongBinder = parcel.readStrongBinder();
                if (readStrongBinder != null) {
                    queryLocalInterface3 = readStrongBinder.queryLocalInterface(str);
                    if (queryLocalInterface3 instanceof c) {
                        cVar = (c) queryLocalInterface3;
                    } else {
                        cVar = new e(readStrongBinder);
                    }
                }
                registerOnMeasurementEventListener(cVar);
                break;
            case 36:
                readStrongBinder = parcel.readStrongBinder();
                if (readStrongBinder != null) {
                    queryLocalInterface3 = readStrongBinder.queryLocalInterface(str);
                    if (queryLocalInterface3 instanceof c) {
                        cVar = (c) queryLocalInterface3;
                    } else {
                        cVar = new e(readStrongBinder);
                    }
                }
                unregisterOnMeasurementEventListener(cVar);
                break;
            case 37:
                initForTests(parcel.readHashMap(v.a));
                break;
            case 38:
                IBinder readStrongBinder4 = parcel.readStrongBinder();
                if (readStrongBinder4 != null) {
                    queryLocalInterface2 = readStrongBinder4.queryLocalInterface(str2);
                    if (queryLocalInterface2 instanceof hc) {
                        hcVar = (hc) queryLocalInterface2;
                    } else {
                        hcVar = new jc(readStrongBinder4);
                    }
                }
                getTestFlag(hcVar, parcel.readInt());
                break;
            case 39:
                classLoader = v.a;
                if (parcel.readInt() != 0) {
                    z = true;
                }
                setDataCollectionEnabled(z);
                break;
            case 40:
                readStrongBinder = parcel.readStrongBinder();
                if (readStrongBinder != null) {
                    queryLocalInterface3 = readStrongBinder.queryLocalInterface(str2);
                    if (queryLocalInterface3 instanceof hc) {
                        hcVar = (hc) queryLocalInterface3;
                    } else {
                        hcVar = new jc(readStrongBinder);
                    }
                }
                isDataCollectionEnabled(hcVar);
                break;
            case 42:
                setDefaultEventParameters((Bundle) v.a(parcel, Bundle.CREATOR));
                break;
            case 43:
                clearMeasurementEnabled(parcel.readLong());
                break;
            case 44:
                setConsent((Bundle) v.a(parcel, Bundle.CREATOR), parcel.readLong());
                break;
            case 45:
                setConsentThirdParty((Bundle) v.a(parcel, Bundle.CREATOR), parcel.readLong());
                break;
            default:
                return false;
        }
        parcel2.writeNoException();
        return true;
    }
}
